﻿using System;
using System.Collections;

namespace System.Data
{
    /// <summary>
    /// IDataSource interface
    /// </summary>
    public interface IDataSource
    {
        #region Properties
        /// <summary>
        /// Data source name
        /// </summary>
        string Name
        {
            get;
        }

        /// <summary>
        /// Gets rows
        /// </summary>
        DataRowCollection Rows
        {
            get;
        }
        #endregion

        #region Methods
        /// <summary>
        /// Copies DataTable or DataView structure and data
        /// </summary>
        /// <param name="addPrefix">Add "CopyOf" prefix to copied object name</param>
        /// <returns>Copied DataTable or DataView</returns>
        IDataSource Copy(bool addPrefix);

        /// <summary>
        /// Generates bindable objects
        /// </summary>
        /// <param name="connector">Connector instance</param>
        /// <returns>Collection of generated bindable objects</returns>
        IList GetBindableData(Connector connector);
        #endregion
    }
}
